.sidebar-container {
  width: 240px;
  background-color: #1f2937;
  color: #f3f4f6;
  height: calc(100vh - 64px); /* 减去Header高度，占满剩余垂直空间 */
  transition: width 0.3s ease;
  overflow: hidden;
  z-index: 99; /* 低于Header，高于Content */
  display: flex;
  flex-direction: column;
  position: fixed; /* 固定左侧，不随滚动移动 */
  top: 64px; /* 与Header底部对齐 */
  left: 0;
}

.sidebar-header {
  padding: 16px 24px;
  border-bottom: 1px solid #374151;
}

.sidebar-logo {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #f9fafb;
}

.sidebar-menu {
  padding: 16px 0;
  flex: 1;
  overflow-y: auto; /* 菜单过多时可滚动 */
}

.sidebar-submenu {
  margin-bottom: 8px;
}

.submenu-header {
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submenu-header:hover,
.submenu-header.active {
  background-color: #374151;
}

.sidebar-menu-item {
  display: block;
  padding: 12px 24px 12px 36px; /* 子菜单缩进 */
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.2s;
}

.sidebar-menu-item:hover,
.sidebar-menu-item.active {
  color: #ffffff;
  background-color: #374151;
}

.submenu-items {
  background-color: #2d3748;
}

.expand-icon {
  font-size: 12px;
  transition: transform 0.2s;
}

.expand-icon.expanded {
  transform: rotate(90deg);
}

.menu-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
